package cn.txun.springboot51;

import cn.txun.springboot51.entity.Emp;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface EmpMapper {
    @Insert("insert into emp values(null,#{name},#{job},#{sal})")
    int insert(Emp emp);
    @Select("select * from emp")
    List<Emp> select();
    @Delete("delete from emp where id=#{id}")
    int deleteById(int id);
    @Update("update emp set name=#{name},job=#{job},sal=#{sal}")
    int update(Emp emp);
    @Select("select * from emp where id=#{id}")
    Emp selectById(int id);
}
